<?php
include("include/config.inc.php");
if(!isset($_SESSION['s_activId']))
{
  $_SESSION['s_urlRedirectDir'] = $_SERVER['REQUEST_URI'];
  header("Location:checkLogin.php");
}
if(!isset($_SESSION['s_activId']))
{
  $_SESSION['s_urlRedirectDir'] = $_SERVER['REQUEST_URI'];
  header("Location:checkLogin.php");
}
$itemId = $_REQUEST['itemVal'];

$sizeArry = array();
$i = 0;
echo $selectItem = "SELECT size.sizeId,sizeName
                 FROM size
                 JOIN subItem ON subItem.sizeId = size.sizeId
                WHERE subItem.itemId = ".$itemId."
             ORDER BY sizeName";
$selectItemResult = mysql_query($selectItem);
while($sizeRow = mysql_fetch_array($selectItemResult))
{
	$sizeArry['sizeId']   = $sizeRow['sizeId'];
	$sizeArry['sizeName'] = $sizeRow['sizeName'];
	$i++;
}
include("./bottom.php");
$smarty->assign('sizeArry',$sizeArry);
$smarty->display('ajaxRisponceItem.tpl');
?>